Skip to content

feat(components): Implement dynamic ProjectCard with conditional UI - #265

Merged
0xdevcollins merged 1 commit into
boundlessfi:mainfrom
Marvelousmicheal:feature/dynamic-project-card
Sep 20, 2025
Merged

feat(components): Implement dynamic ProjectCard with conditional UI#265
0xdevcollins merged 1 commit into
boundlessfi:mainfrom
Marvelousmicheal:feature/dynamic-project-card

Conversation

@Marvelousmicheal

Copy link
Copy Markdown
Contributor

PR Description:

This PR refactors the ProjectCard component from a static element
into a fully dynamic and reusable component. It introduces a
comprehensive set of props to control all aspects of the card's
content and appearance, making it adaptable to various project
states.

Key Changes:

  • Props-Driven Architecture: The component now accepts props for all
    dynamic data, including creator details, project information, and
    status-specific values like votes, funding, and milestones.
  • Conditional Status Badge: The validation badge is now a dynamic
    status badge that changes its color and text based on the
    project's status (Validation, Funding, Funded, Completed).
  • Dynamic Footer Content: The footer now conditionally renders the
    correct information based on the project's status:
    • Validation: Displays current vs. goal votes.
    • Funding: Shows the amount raised towards the goal.
    • Funded/Completed: Tracks milestone progress.
  • Deadline Urgency Coloring: The deadline text now changes color to
    create a sense of urgency:
    • 15 days: Standard color.

    • <= 15 days: Warning color.
    • <= 3 days: Error/urgent color.
    • Displays a "Milestone Rejected" message when applicable.
  • Number Formatting Utility: A new formatNumber utility has been
    added to lib/utils.ts to convert large numbers into a more
    readable format (e.g., 120000 becomes 120k).
  • "Read More" UX Enhancement: The project description now truncates
    to three lines with an ellipsis and smoothly expands on hover
    without causing any layout shift.
  • Showcase Page: The /projects page has been updated to display five
    different ProjectCard instances, demonstrating the component's
    various states and dynamic capabilities.
boundless-card.webm

@vercel

vercel Bot commented Sep 20, 2025

Copy link
Copy Markdown

@Marvelousmicheal is attempting to deploy a commit to the christroa's projects Team on Vercel.

A member of the Team first needs to authorize it.

@0xdevcollins

Copy link
Copy Markdown
Collaborator

LGTM 🚀

@0xdevcollins
0xdevcollins merged commit ab186c3 into boundlessfi:main Sep 20, 2025
7 of 12 checks passed
@0xdevcollins 0xdevcollins linked an issue Sep 20, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement The remaining states in the project Card

2 participants